VERSION=3.4.14
NAME=zookeeper
IMAGE_URL=${HARBOR_PROJECT}/${NAME}:${VERSION}

all: build push

build:
	@docker pull ${NAME}:${VERSION}
	@docker tag ${NAME}:${VERSION} ${IMAGE_URL}

push: build
	@docker push ${IMAGE_URL}
	@docker rmi ${NAME}:${VERSION}

image:
	@sed -i "s#image:.*#image: ${IMAGE_URL}#g" ${NAME}-compose.yml

version:
	@echo ${IMAGE_URL}

clean:
	@docker-compose -f ${NAME}-compose.yml down -v

start:
	@docker-compose -f ${NAME}-compose.yml up -d
	@docker-compose ps

.PHONY: all build push
